﻿static Expression<Func<ScriptableOptionsContext, string>> TestScriptableColor = ( context ) => context.Active ? "#ff0000" : "#4bc0c0";

List<ChartDataLabelsDataset> lineDataLabelsDatasets = new()
{
    new()
    {
        DatasetIndex = 0,
        Options = new()
        {
            BackgroundColor = TestScriptableColor,
            BorderColor = TestScriptableColor,
            Align = "start",
            Anchor = "start"
        }
    },
    ...
};